package com.zlll.winner.service.media;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zlll.winner.business.model.media.MediaUrlSetting;
import com.zlll.winner.mapper.media.MediaUrlSettingMapper;
import com.zlll.winner.business.service.media.IMediaUrlSettingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author qsx
 * @since 2019-10-12
 */
@Service
public class MediaUrlSettingServiceImpl extends ServiceImpl<MediaUrlSettingMapper, MediaUrlSetting> implements IMediaUrlSettingService {

    @Autowired
    private MediaUrlSettingMapper mediaUrlSettingMapper;

    /**
     * 获取推流地址
     * @return
     */
    @Override
    public MediaUrlSetting getMediaUrlSetting() {
        LambdaQueryWrapper<MediaUrlSetting> wrapper = Wrappers.lambdaQuery();
        return mediaUrlSettingMapper.selectOne(wrapper);
    }
}
